package com.main.config.db

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor
import org.springframework.context.annotation.Bean
import org.springframework.stereotype.Component

@Component
class DBBaseConfig {
    //MybatisPlus分页插件
    @Bean
    fun paginationInterceptor(): PaginationInterceptor = PaginationInterceptor()

    open class DBConfigModel {
        var url: String? = null
        var username: String? = null
        var password: String? = null
        var minPoolSize = 3
        var maxPoolSize = 25
        var maxLifetime = 20000
        var borrowConnectionTimeout = 30
        var loginTimeout = 30
        var maintenanceInterval = 60
        var maxIdleTime = 60
        var testQuery = "select 1"
    }
}
